
function StageCfgVoData() {
    this.id;
    this.lv;
    this.grade;
    this.name;
    this.rowNum;
    this.allNum;
    this.initLocalX;
    this.initLocalY;
    this.initDir;
    this.hasFunc1;
    this.hasFunc2;
    this.sysTokenMax;
    this.mainTokenMax;
    this.func1TokenMax;
    this.func2TokenMax;
    this.comment;
    this.sound;
    this.bestCode;
    this.bestTime;
};
StageCfgVoData.prototype.setValue = function (mData) {
    this.id = mData.id;
    this.lv = mData.lv;
    this.grade = mData.grade;
    this.name = mData.name;
    this.rowNum = mData.rowNum;
    this.allNum = mData.allNum;
    this.initLocalX = mData.initLocalX;
    this.initLocalY = mData.initLocalY;
    this.initDir = mData.initDir;
    this.hasFunc1 = mData.hasFunc1;
    this.hasFunc2 = mData.hasFunc2;
    this.sysTokenMax = mData.sysTokenMax;
    this.mainTokenMax = mData.mainTokenMax;
    this.func1TokenMax = mData.func1TokenMax;
    this.func2TokenMax = mData.func2TokenMax;
    this.comment = mData.comment;
    this.sound = mData.sound;
    this.bestCode = mData.bestCode;
    this.bestTime = mData.bestTime;
};

var StageCfgData = {
    dataList: null,
    filePath: null,
    init: function () {
        this.dataList = new window.dictionary();
        this.filePath = window.Constant.RootPath.CONFIG_ROOT_PATH + "Stage";
        // this.filePath = "configs/Stage";
        // this.dataDic=window.data.ButtleData.dataDiction;
        window.cc.loader.loadRes(this.filePath, (function (err, array) {
            if (err) {
                console.log("错误信息:" + err);
                return;
            }
            var arrs = array.json;
            for (var i = 0; i < arrs.length; i++) {
                var mData = arrs[i];
                var mVoData = new StageCfgVoData();
                mVoData.setValue(mData);
                this.dataList.add(mVoData.id, mVoData);
            }

        }).bind(this));
    },
    getStageCfgData: function () {
        return this.dataList;
    }
}
module.exports = StageCfgData ;

